<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\publics\service;

class PublicsService
{
    public static function getTmplByModelName($uniacid, $model_name)
    {
        $dataPath = APP_PATH . $model_name . "/info/Info.php";
        $service_model = new \longbingcore\wxcore\WxTmpl($uniacid);
        $tmpl_data = [];
        if(file_exists($dataPath)) {
            $model = new \app\publics\model\TmplConfig();
            $info = (include $dataPath);
            $model_name = $info["name"];
            if(isset($info["tmpl_name"])) {
                $tmpl_name = $info["tmpl_name"];
                foreach ($tmpl_name as $value) {
                    $param = $service_model::tmplParam($value);
                    $dis = ["uniacid" => $uniacid, "model_name" => $model_name, "tmpl_name" => $value, "tid" => $param["tid"], "kidList" => $param["kidList"], "kid" => $param["kid"], "sceneDesc" => $param["sceneDesc"], "example" => $param["example"]];
                    $tmpl_info = $model->tmplInfo($dis);
                    $tmpl_data[] = $tmpl_info;
                }
            }
        }
        return $tmpl_data;
    }
}

?>